package com.example.manage_dzensaas.core.enums;

/**
 * 返回值状态枚举
 */
public enum ErrorCodeEnum {
    SUCCESS(1, "成功"),
    ERROR(0, "失败"),
    INTERNAL_ERROR(500, "服务器内部错误"),
    NOT_FOUND(404, "资源未找到"),
    BAD_REQUEST(400, "错误的请求"),
    UNAUTHORIZED(401, "未授权"),
    FORBIDDEN(403, "禁止访问"),
    CUSTOM_EXCEPTION(300, "自定义异常"),
    PARAM_ERROR(4001, "参数错误"),
    TIME_ERROR(4002, "时间戳过期"),
    TIME_FORMAT_ERROR(4003, "时间戳格式错误"),
    CHANNEL_ERROR(4004, "渠道不存在"),
    SIGN_ERROR(4005, "签名验证失败"),
    ERROR_NO(0000, "00000");

    private final int code;
    private final String message;

    ErrorCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
